﻿// AdvancedDataStructure.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include <iostream>
#include <string>

using namespace std;

class Student
{
public:
    Student() : name(""), age(0) {}

    void set_age(int age) { this->age = age; }
    int get_age() const { return this->age; }
    void set_name(string name) { this->name = name; }
    string get_name() const { return this->name; }

private:
    string name;
    int age;
};

static void increment_age(Student& s)
{
    s.set_age(s.get_age() + 1);
}

int main()
{
    //unsigned int a = 5;
    //unsigned int* pint = NULL;

    //cout << "&a = " << &a << endl << " a = " << a << endl;

    //cout << "Hello World!\n";

    Student s;
    s.set_name("Wushuang");
    s.set_age(26);

    cout << s.get_age() << endl;
    increment_age(s);
    cout << s.get_age() << endl;

    return 0;
}
